<?php

require_once(RX_PATH."Database/RXSelect.php");

class GenericReader{
	
	protected $select;
	protected $connection;
	protected $object;
	protected $operation;
	protected $limits;
	
	public function __construct($object = NULL, $connection = NULL){
		$this->connection = $connection;
		$this->object = $object;		
	}
		
	public function setObject($object){
		$this->object = $object;
	}
	
	public function getObject(){
		return $this->object;
	}
	
	public function setOperation($operation = NULL){
		$this->operation = $operation;
	}
	
	public function getCount(){
		if(isset($this->select))
			return $this->select->count();
	}
	
	public function setLimits($limit, $count){
		$this->limits[0] = $limit;
		$this->limits[1] = $count;
	}
	
	public function execute(){ return FALSE; }
	
}